import { Tools } from 'weaver-mobile';
import { catchApiError } from '../util/index';

// 
export const getRoomReportBaseData = params => {
	let options = {
		method: 'POST',
		url: '/api/meeting/room/getRoomReportBaseData',
		params: params
	};
	return Tools.callApi(options).then(catchApiError);
};
// 查询会议室使用情况
export const getRoomReportData = params => {
	let options = {
		method: 'POST',
		url: '/api/meeting/room/getRoomReportData',
		params: params
	};
	return Tools.callApi(options).then(catchApiError);
};
// 查询会议列表
// export const getRoomReportList = params => {
// 	params = {...params, ismobile: 1};
// 	let options = {
// 		method: 'POST',
// 		url: '/api/meeting/room/getRoomReportList',
// 		params: params
// 	};
// 	return Tools.callApi(options).then(catchApiError);
// };
export const getRoomMeetingList = params => {
	let options = {
		method: 'POST',
		url: '/api/meeting/field/getMeetingReportDetailForMobile',
		params: {...params, ismobile: 1},
		type: 'json'
	};
	return Tools.callApi(options).then(catchApiError);
};
// 获取会议室的会议
export const getRoomMeetingData = params => {
	let options = {
		method: 'POST',
		url: '/api/ec/dev/table/datas',
		params: params
	};
	return Tools.callApi(options).then(catchApiError);
};